package com.happycat.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.happycat.Pagination;
import org.springframework.web.bind.annotation.RequestBody;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.happycat.ResponseModel;
import com.happycat.ResponseHeaderModel;
import com.happycat.mobile.model.CatCircleStroke;
import com.happycat.mobile.service.CatCircleStrokeService;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liaoyong
 * @since 2020-08-01
 */
@RestController
@RequestMapping("/catCircleStroke")
@Api(value = "圈子行程", description = "圈子行程接口")
public class CatCircleStrokeController {
    @Autowired
	private CatCircleStrokeService catCircleStrokeService;
	
	@ApiOperation(value = "圈子行程详情")
    @RequestMapping(method = RequestMethod.POST, value = "/detail")
	public ResponseModel<CatCircleStroke> detail(@RequestBody CatCircleStroke catCircleStroke){
		return catCircleStrokeService.selectOne(catCircleStroke);
	}
	
	@RequestMapping(method = RequestMethod.POST, value = "/page")
	@ApiOperation(value = "圈子行程分页列表")
	public ResponseModel<Page<CatCircleStroke>> Page(@RequestBody Pagination<CatCircleStroke>page){
		return catCircleStrokeService.pageList(page);
	}
	
	@RequestMapping(method = RequestMethod.POST, value = "/add")
	@ApiOperation(value = "圈子行程新增")
	public ResponseHeaderModel add(@RequestBody CatCircleStroke catCircleStroke){
	
	   return catCircleStrokeService.add(catCircleStroke);
	}
	@ApiOperation(value = "圈子行程编辑")
	@RequestMapping(method = RequestMethod.POST, value = "/modify")
	public ResponseHeaderModel modify(@RequestBody CatCircleStroke catCircleStroke){
	
	   return catCircleStrokeService.modify(catCircleStroke);
	}
	
}

